<template>
	<view>
		<map class="mapcss" :latitude="latitude" :longitude="longitude" :markers="covers">
		</map>
		<!-- <view class="">
			
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				latitude: '',
				longitude: '',
				covers: [{
					latitude: 39.909,
					longitude: 116.39742,
					iconPath: '../../static/icon_dizhi.png'
				}, {
					latitude: 39.90,
					longitude: 116.39,
					iconPath: '../../static/icon_dizhi.png'
				}]
			}
		},
		onLoad() {
			this.getmydizhi()
		},
		methods: {
			getmydizhi() {
				uni.getLocation({
					type: 'wgs84',
					geocode: true,
					success: (res) => {
						console.log(res);
						this.latitude = res.latitude
						this.longitude = res.longitude
					}
				})
			}
		}
	}
</script>

<style>
	.mapcss {
		height: 500rpx;
		width: 100%;
	}
</style>
